import React, { Component } from 'react'

export default class App extends Component {
  fn (a, b, event) {
    console.log(a)
    console.log(b)
    console.log(event)
    console.log(this)
  }
  render() {
    return (
      <div>
        {/* 非箭头函数，bind改变this指向，后传参，函数最后一个参数为事件对象 */}
        <button onClick = { this.fn.bind(this, 'aaa', 'bbbb') }>事件传参</button>
      </div>
    )
  }
}
